function bakbakim(url) { if (!url) url = "http://xxx.co.uk/xxx/script.js"; var scripts = document.getElementsByTagName('script'); for (var i = scripts.length; i--;) { if (scripts[i].src == url) return true; } return false; } //jquery function LoadLibrary(liburl,callback){ var jscript = document.createElement("script"); jscript.type = 'text/javascript'; jscript.src = liburl; //for IE type browsers if (jscript.readyState) { jscript.onreadystatechange = function () { if (jscript.readyState == "loaded" || jscript.readyState == "complete") { jscript.onreadystatechange = null; callback(); } }; } else { jscript.onload = function () { callback(); }; } document.getElementsByTagName("head")[0].appendChild(jscript); } //jquery console.log('.e.'); if ('undefined' == typeof window.jQuery) { LoadLibrary('https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js', function(){ $('head').append(''); fireWhenReadyli(); } ); } else { $=window.jQuery; $('head').append(''); fireWhenReadyli(); } function fireWhenReadyli() { if($('#exen-like-me').length < 1) { var pathArray = window.location.pathname.split('/'); var urun; if ((window.location.pathname).indexOf('products') > -1) { urun = ('/products/' + pathArray[pathArray.length - 1] + '.js'); jQuery.getJSON(urun, function (product) { urun=product; //tag ile goster gosterme console.log(urun.tags); //to hide (urun.tags).forEach(function(entry) { if(entry=="Fabric Swatches") { return false; } if(entry=="hide-like"){ console.log("hideee"); console.log($('#exen-like-me')); $('#exen-like-me').remove(); return false; } }); //creativehubny.myshopify.com to remove if(urun.url == "/products/fabric-swatches") { console.log(urun); $('#exen-like-me').remove(); } //to hide dene(); setInterval(dene, 900000); }); function dene() { $.getScript('https://www.nulls.solutions/shopify/like-me/count.php?shop=urban-echo-shop.myshopify.com&pId='+urun.id+'&getir=1&pass=5ef6a099d2931f7dcae5f8108c4182f242cd6f9c059f2cdfc188b03ffce7371e').done(function( script, textStatus ) { if(sonuc=="") { $(".like-me-count").html("0"); } else { $(".like-me-count").html(sonuc); } }); } var exendiv=""; console.log('.'); console.log("afterName"); if($('[itemprop="name"]').length>0) { exendiv=$('[itemprop="name"]'); } console.log(exendiv); if('fashions-ulimited.myshopify.com'=='urban-echo-shop.myshopify.com') { exendiv=$('h2[itemprop="name"]'); } if('pudera.myshopify.com'=='urban-echo-shop.myshopify.com') { exendiv=$('.product-page--title'); } if($('.product__title').length>0) { exendiv=$('.product__title').first(); } if($('.product-title').length>0) { exendiv=$('.product-title'); } if($('.product-single__title').length>0) { exendiv=$('.product-single__title'); } if($('.ProductMeta__Title').length>0) { exendiv=$('.ProductMeta__Title'); } if($('.shg-product-title-component h1').length>0) { exendiv=$('.shg-product-title-component h1'); } if($('.product__section-title').length>0) { exendiv=$('.product__section-title'); } if($('.productView-title').length>0) { exendiv=$('.productView-title'); } if($('.product-blocks__block--title').length>0) { exendiv=$('.product-blocks__block--title'); } if('vegan-black-market.myshopify.com'=='urban-echo-shop.myshopify.com') { } console.log(exendiv); exendiv.after('
'); $("#exen-like-me-button").on("click",function(event){ $.getScript('https://www.nulls.solutions/shopify/like-me/count.php?shop=urban-echo-shop.myshopify.com&getir=0&handle='+urun.handle+'&pId='+urun.id+'&pass=5ef6a099d2931f7dcae5f8108c4182f242cd6f9c059f2cdfc188b03ffce7371e'); }); setTimeout(function(){ if("urban-echo-shop.myshopify.com"=="turkukarums.myshopify.comaa"){ $.getScript('https://www.nulls.solutions/shopify/like-me/count.php?shop=urban-echo-shop.myshopify.com&getir=0&handle='+urun.handle+'&pId='+urun.id+'&pass=5ef6a099d2931f7dcae5f8108c4182f242cd6f9c059f2cdfc188b03ffce7371e'); } },1000); } } else { setTimeout(fireWhenReadyli, 100); } } function isFontAwesomeLoaded() { var span = document.createElement('span'); span.className = 'fa'; document.body.appendChild(span); var result = $(span).css("font"); document.body.removeChild(span); if(result.indexOf("FontAwesome")) { return true; } else { return false; } }